package com.example.demo.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.dto.StatusDto;
import com.example.demo.dto.SysUserDto;
import com.example.demo.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
    // 查询分页的数据
    List<SysUser> getPageData(Map<String, Object> params);

    // 查询满足条件的总页数
    Long getTotal(Map<String, Object> params);

    void updateStatus(StatusDto statusDto);

    SysUser getById(Integer id);

    void addSysUser(SysUserDto sysUserDto);

    void addUserRole(SysUserDto sysUserDto);

    SysUser getByIdForEdit(Integer id);

    void editSysUser(SysUserDto sysUserDto);

    //删除user-role信息
    Integer deleteUserRole(Integer id);
}
